package com.practice2.exercise;

import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserTest {
    @Test
    public void  test(){
        ClassPathXmlApplicationContext applicationContext =
                new ClassPathXmlApplicationContext("user.xml");
User bean = applicationContext.getBean("user", User.class);
bean.show();
User bean1 = applicationContext.getBean("user1", User.class);
bean1.show();
        System.out.println(bean1);
        System.out.println(bean);

    }
}
